-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
remove go.layout.shape from the tutorial #2104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is the right idea! Please apply the same changes in any file that contains |
This one is pretty important: https://plot.ly/python/text-and-annotations/ |
fig.update_layout(title_text="A Bar Chart", title_font=dict(size=30)) | ||
fig.update_layout(title=dict(text="A Bar Chart"), font=dict(size=30)) | ||
fig.update_layout({"title": {"text": "A Bar Chart", "font": {"size": 30}}}) | ||
fig.update_layout(title=dict(text="A Bar Chart", font=dict(size=30))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we want to keep the go.layout.Title
because we're showing equivalent syntaxes, although the recommended one does not use go.layout
.
There is just one place where we want I think to keep the |
@@ -0,0 +1 @@ | |||
pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this file plz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.gitignore didn't ignore it! "git rm --cached .mapbox_token" removes it from repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK but it's still here... you'll have to remove it again and push again :)
doc/python/text-and-annotations.md
Outdated
hovertext=["Text A", "Text B", "Text C"] | ||
)) | ||
|
||
fig.add_trace(go.Scatter(x=[0, 1, 2], y=[1, 3, 2], mode="markers", hovertext=["Text A", "Text B", "Text C"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably too long
doc/python/text-and-annotations.md
Outdated
x=[0, 1, 2, 3, 4, 5, 6, 7, 8], | ||
y=[0, 4, 5, 1, 2, 2, 3, 4, 2] | ||
)) | ||
fig.add_trace(go.Scatter(x=[0, 1, 2, 3, 4, 5, 6, 7, 8], y=[0, 1, 3, 2, 4, 3, 4, 6, 5])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were good before
doc/python/text-and-annotations.md
Outdated
] | ||
) | ||
|
||
dict(x=2, y=5, xref="x", yref="y", text="dict Text", showarrow=True, arrowhead=7, ax=0, ay=-40)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also let's convert this to add_annotation
doc/python/text-and-annotations.md
Outdated
z=1 | ||
) | ||
), | ||
scene=dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turn this into update_scenes()
xaxis=dict(title_text="", type="date"), | ||
yaxis=dict(title_text="", type="category"), | ||
zaxis=dict(title_text="", type="log"), | ||
annotations=[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert to add_annotation
doc/python/text-and-annotations.md
Outdated
size=16, | ||
color="#ffffff" | ||
), | ||
dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no dict
needed
@@ -42,17 +42,12 @@ import plotly.graph_objects as go | |||
|
|||
fig = go.Figure(go.Scatter( | |||
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], | |||
y = [28.8, 28.5, 37, 56.8, 69.7, 79.7, 78.5, 77.8, 74.1, 62.6, 45.3, 39.9] | |||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these parentheses should stay on their own line
|
||
fig.update_layout( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i consider this cleaner... not that strong an opinion
Can you rebase this onto the latest |
colorscale=[[0,'rgb(0, 0, 0)'],[1,'rgb(0, 0, 0)']], | ||
autocolorscale=False, | ||
showscale=False, | ||
geo='geo2')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all these trailing parentheses should go back to being on their own line please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping that this PR would be a simple "remove all go.layout.whatever
but it actually contains a lot of hard-to-review/hard-to-undo changes like this, so is it possible to please break this up into multiple easier-to-review PRs? like one with just the "go.layout.whatever
to dict
" change and another with the replacement of =
to =
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, to make it less painful I created #2171 for removal of go.layout.* and will take care of formatting later
closes #2093